﻿<%@ page language="C#" autoeventwireup="true" inherits="DNS.GauriMariam.Web.Blogs, App_Web_s83opvs6" enableeventvalidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body bgcolor="">
    <form id="form1" runat="server">
        <div>
                <asp:Table ID="TCategories" runat="server" HorizontalAlign="Center" BackColor="LightSlateGray" ForeColor="White" Font-Size="X-Small" BorderStyle="Solid" BorderWidth="1px" BorderColor="darkslategray" Width="100%">
                </asp:Table>
                <div id="DivShowNewPost" align="right">
                    <a style="font-family:Comic Sans MS; font-size:x-small; color:DarkSlateBlue" href="#pagebottom" onclick="javascript:showNewPost();">Add New Post !</a>
                </div>
                <asp:GridView ID="GVPosts" runat="server" Font-Names="Comic Sans MS" Font-Size="X-Small" Style="z-index: 100;" AutoGenerateColumns="False" OnRowDataBound="GVPosts_RowDataBound" ShowHeader="false" EnableViewState="false">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Image ID="IPostMain" runat="server" Style="z-index: 100;" Visible="false" />
                            </ItemTemplate>
                            <ItemStyle BackColor="Transparent" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="LBPostTitle" runat="server" OnClick="LBPostTitle_Click"></asp:LinkButton>
                                <asp:Label ID="LPost" runat="server" Style="z-index: 100;" Width="100%" Font-Size="Small">
                                </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Table ID="TPostPics" runat="server" Style="z-index: 100;">
                                <asp:TableRow>
                                    <asp:TableCell>
                                       <asp:ImageButton ID="IBPostThumb1" runat="server" Style="z-index: 100;" OnClick="ImageButton_Click" Visible="false" />
                                    </asp:TableCell>
                                    <asp:TableCell>
                                       <asp:ImageButton ID="IBPostThumb2" runat="server" Style="z-index: 100;" OnClick="ImageButton_Click" Visible="false" />
                                    </asp:TableCell>
                                </asp:TableRow>
                                <asp:TableRow>
                                    <asp:TableCell>
                                       <asp:ImageButton ID="IBPostThumb3" runat="server" Style="z-index: 100;" OnClick="ImageButton_Click" Visible="false" />
                                    </asp:TableCell>
                                    <asp:TableCell>
                                       <asp:ImageButton ID="IBPostThumb4" runat="server" Style="z-index: 100;" OnClick="ImageButton_Click" Visible="false" />
                                    </asp:TableCell>
                                </asp:TableRow>
                                </asp:Table>
                            </ItemTemplate>
                           <ItemStyle BackColor="Transparent" />
                        </asp:TemplateField>
                    </Columns>            
                    <RowStyle BackColor="White" ForeColor="DarkSlateGray" />
                    <AlternatingRowStyle BackColor="Gainsboro" ForeColor="Navy" />
                </asp:GridView>
        <a id="pagebottom"></a>
        <div id="DivNewPost" style="visibility: hidden;">
            <asp:Label ID="LPostName" runat="server" Text="Name: "  Width="10%"></asp:Label>
            <asp:TextBox ID="TBPostName" runat="server"  Width="37%"></asp:TextBox>
            <asp:Label ID="LPostEmail" runat="server" Text="Email: "  Width="10%"></asp:Label>
            <asp:TextBox ID="TBPostEmail" runat="server"  Width="37%"></asp:TextBox>
            <asp:Label ID="LCategory" runat="server" Text="Category: "  Width="10%"></asp:Label>
            <asp:DropDownList ID="DDLPostCategory" runat="server" DataSourceID="ODSCategories" DataTextField="Name" DataValueField="Categoryid" Width="37%" OnDataBound="DDLPostCategory_DataBound">
            </asp:DropDownList>
            <asp:TextBox ID="TBPostCategory" runat="server" Width="37%"></asp:TextBox>
            <asp:Label ID="LBlank" runat="server" Text=" "  Width="10%"></asp:Label>
            <asp:Label ID="LPostTitle" runat="server" Text="Title: "  Width="10%"></asp:Label>
            <asp:TextBox ID="TBPostTitle" runat="server"  Width="87%"></asp:TextBox>
            <asp:Label ID="LPostSubtitle" runat="server" Text="Subtitle: "  Width="10%"></asp:Label>
            <asp:TextBox ID="TBPostSubtitle" runat="server"  Width="87%"></asp:TextBox>
            <asp:TextBox ID="TBPostContents" runat="server" Style="z-index: 100;" TextMode="MultiLine" Width="100%" Rows="5"></asp:TextBox>
            <asp:FileUpload ID="FUPost1" runat="server" BackColor="#FAFAF0" Width="100%"  BorderWidth="1px" Font-Size="X-Small" />
            <asp:FileUpload ID="FUPost2" runat="server" BackColor="#FAFAF0" Width="100%"  BorderWidth="1px" Font-Size="X-Small" />
            <asp:FileUpload ID="FUPost3" runat="server" BackColor="#FAFAF0" Width="100%"  BorderWidth="1px" Font-Size="X-Small" />
            <asp:FileUpload ID="FUPost4" runat="server" BackColor="#FAFAF0" Width="100%"  BorderWidth="1px" Font-Size="X-Small" />
            <br /><asp:Button ID="BUploadPost" runat="server" Style="z-index: 102;" Text="Upload & Submit Post !" OnClick="BUploadPost_Click"/>
        </div>
            <asp:ObjectDataSource ID="ODSCategories" runat="server" SelectMethod="GetCategories"
                TypeName="DNS.Blogs.BLL.Processor">
                <SelectParameters>
                    <asp:SessionParameter DefaultValue="bharathmatha.com" Name="website" SessionField="Website"
                        Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>

        </div>
       <script language="javascript" type="text/javascript">
        function showNewPost()    
        {
           var newpostdiv = document.getElementById('DivNewPost');
           newpostdiv.style.visibility = 'visible';
        }
    </script>
     
    </form>
</body>
</html>
